Optimal. Leaf size=269 \[ \frac {2^{\frac {1}{2}+n} c ((1+m+n) (C (1-m+n)+A (2+m+n))+(m-n) (C+2 C m+B (2+m+n))) \cos (e+f x) \, _2F_1\left (\frac {1}{2} (1+2 m),\frac {1}{2} (1-2 n);\frac {1}{2} (3+2 m);\frac {1}{2} (1+\sin (e+f x))\right ) (1-\sin (e+f x))^{\frac {1}{2}-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+n}}{f (1+2 m) (1+m+n) (2+m+n)}-\frac {(C+2 C m+B (2+m+n)) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n}{f (1+m+n) (2+m+n)}+\frac {C \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{1+n}}{c f (2+m+n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.48, antiderivative size = 269, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 46, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3118, 3052,
2824, 2768, 72, 71} \begin {gather*} \frac {c 2^{n+\frac {1}{2}} \cos (e+f x) ((m+n+1) (A (m+n+2)+C (-m+n+1))+(m-n) (B (m+n+2)+2 C m+C)) (1-\sin (e+f x))^{\frac {1}{2}-n} (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-1} \, _2F_1\left (\frac {1}{2} (2 m+1),\frac {1}{2} (1-2 n);\frac {1}{2} (2 m+3);\frac {1}{2} (\sin (e+f x)+1)\right )}{f (2 m+1) (m+n+1) (m+n+2)}-\frac {(B (m+n+2)+2 C m+C) \cos (e+f x) (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^n}{f (m+n+1) (m+n+2)}+\frac {C \cos (e+f x) (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n+1}}{c f (m+n+2)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 71
Rule 72
Rule 2768
Rule 2824
Rule 3052
Rule 3118
Rubi steps
\begin {align*} \int (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n \left (A+B \sin (e+f x)+C \sin ^2(e+f x)\right ) \, dx &=\frac {C \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{1+n}}{c f (2+m+n)}-\frac {\int (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n (-a c (C (1-m+n)+A (2+m+n))-a c (C+2 C m+B (2+m+n)) \sin (e+f x)) \, dx}{a c (2+m+n)}\\ &=-\frac {(C+2 C m+B (2+m+n)) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n}{f (1+m+n) (2+m+n)}+\frac {C \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{1+n}}{c f (2+m+n)}+\frac {((1+m+n) (C (1-m+n)+A (2+m+n))+(m-n) (C+2 C m+B (2+m+n))) \int (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n \, dx}{(1+m+n) (2+m+n)}\\ &=-\frac {(C+2 C m+B (2+m+n)) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n}{f (1+m+n) (2+m+n)}+\frac {C \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{1+n}}{c f (2+m+n)}+\frac {\left (((1+m+n) (C (1-m+n)+A (2+m+n))+(m-n) (C+2 C m+B (2+m+n))) \cos ^{-2 m}(e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^m\right ) \int \cos ^{2 m}(e+f x) (c-c \sin (e+f x))^{-m+n} \, dx}{(1+m+n) (2+m+n)}\\ &=-\frac {(C+2 C m+B (2+m+n)) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n}{f (1+m+n) (2+m+n)}+\frac {C \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{1+n}}{c f (2+m+n)}+\frac {\left (c^2 ((1+m+n) (C (1-m+n)+A (2+m+n))+(m-n) (C+2 C m+B (2+m+n))) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{\frac {1}{2} (-1-2 m)+m} (c+c \sin (e+f x))^{\frac {1}{2} (-1-2 m)}\right ) \text {Subst}\left (\int (c-c x)^{-m+\frac {1}{2} (-1+2 m)+n} (c+c x)^{\frac {1}{2} (-1+2 m)} \, dx,x,\sin (e+f x)\right )}{f (1+m+n) (2+m+n)}\\ &=-\frac {(C+2 C m+B (2+m+n)) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n}{f (1+m+n) (2+m+n)}+\frac {C \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{1+n}}{c f (2+m+n)}+\frac {\left (2^{-\frac {1}{2}+n} c^2 ((1+m+n) (C (1-m+n)+A (2+m+n))+(m-n) (C+2 C m+B (2+m+n))) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-\frac {1}{2}+\frac {1}{2} (-1-2 m)+m+n} \left (\frac {c-c \sin (e+f x)}{c}\right )^{\frac {1}{2}-n} (c+c \sin (e+f x))^{\frac {1}{2} (-1-2 m)}\right ) \text {Subst}\left (\int \left (\frac {1}{2}-\frac {x}{2}\right )^{-m+\frac {1}{2} (-1+2 m)+n} (c+c x)^{\frac {1}{2} (-1+2 m)} \, dx,x,\sin (e+f x)\right )}{f (1+m+n) (2+m+n)}\\ &=\frac {2^{\frac {1}{2}+n} c ((1+m+n) (C (1-m+n)+A (2+m+n))+(m-n) (C+2 C m+B (2+m+n))) \cos (e+f x) \, _2F_1\left (\frac {1}{2} (1+2 m),\frac {1}{2} (1-2 n);\frac {1}{2} (3+2 m);\frac {1}{2} (1+\sin (e+f x))\right ) (1-\sin (e+f x))^{\frac {1}{2}-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+n}}{f (1+2 m) (1+m+n) (2+m+n)}-\frac {(C+2 C m+B (2+m+n)) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n}{f (1+m+n) (2+m+n)}+\frac {C \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{1+n}}{c f (2+m+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 6 vs. order 5 in
optimal.
time = 17.75, size = 6226, normalized size = 23.14 \begin {gather*} \text {Result too large to show} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 1.65, size = 0, normalized size = 0.00 \[\int \left (a +a \sin \left (f x +e \right )\right )^{m} \left (c -c \sin \left (f x +e \right )\right )^{n} \left (A +B \sin \left (f x +e \right )+C \left (\sin ^{2}\left (f x +e \right )\right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a \left (\sin {\left (e + f x \right )} + 1\right )\right )^{m} \left (- c \left (\sin {\left (e + f x \right )} - 1\right )\right )^{n} \left (A + B \sin {\left (e + f x \right )} + C \sin ^{2}{\left (e + f x \right )}\right )\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\left (a+a\,\sin \left (e+f\,x\right )\right )}^m\,{\left (c-c\,\sin \left (e+f\,x\right )\right )}^n\,\left (C\,{\sin \left (e+f\,x\right )}^2+B\,\sin \left (e+f\,x\right )+A\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________